# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

Pod::Spec.new do |s|
  s.name        = 'hermes-engine'
  s.version     = '0.1.2'
  s.summary     = 'Hermes is a small and lightweight JavaScript engine optimized for running React Native.'
  s.description = 'Hermes is a JavaScript engine optimized for fast start-up of React Native apps. It features ahead-of-time static optimization and compact bytecode.'
  s.homepage    = 'https://hermesengine.dev'
  s.license     = { type: 'MIT', file: 'LICENSE' }
  s.author      = 'Facebook'
  s.source         = { :git => 'https://gitee.com/imilab/hermes.git', :tag => s.version.to_s }
  s.platforms   = { :osx => '10.13', :ios => '12.4' }

  s.preserve_paths      = '**/*.*'
  s.source_files        = ''

  spec.xcconfig         = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', 'CLANG_CXX_LIBRARY' => 'compiler-default', 'GCC_PREPROCESSOR_DEFINITIONS' => 'HERMES_ENABLE_DEBUGGER=1' }


  s.subspec 'Pre-built' do |ss|
      ss.vendored_frameworks = 'destroot/Library/Frameworks/universal/hermes.xcframework'
    end

  s.prepare_command = '. hermes/prebuild.sh'

end
